home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Adobe Graphics & Publishing SDK 1996 December
/
Adobe Graphics & Publishing SDK 1996 December.iso
/
pc
/
pm65sdk
/
sourcecode
/
includes
/
ciknowledgebase.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-18
|
2KB
|
75 lines
/***[f*****************************************************************
* CIkb.h -- Knowledge base Interface.
*
* Copyright 1996 (c) Adobe Systems, Inc. All Rights Reserved
*
* Public version
*
* $Revision: 1.1 $
*
*
***f]*****************************************************************/
#ifndef __CIKB
#define __CIKB
#include "pmtypes.h"
// conventions for using following templatedatarec structure:
//
// To be used in an array, where each entry is as follows:
// First entry: template name, # of field slots that follow
// Second entry: id field name, id field value
// If id field name == NULL, use next fact of template
// This ID only for getting.... for setting, just a normal field
// Third, etc.: field name, field value
//
typedef struct _templatedatarec {
char aname[32];
int avalue;
} templatedatarec, FAR *lptemplatedatarec;
class CIkb; // forward declaration
// THE "RULEABLE" CLASS
//
// This class describes a protocol for an object to
// link itself to a rulebase, by providing a method
// that encapsulates the knowledge of the specific
// fact-name in the rulebase that corresponds to each
// member data having a fact. Using multiple inheritance,
// the page, column, and textblock objects inherit from
// this 'ruleable' since they have facts to relate to.
//
class ruleable : public CIInterface {
public:
virtual int getfacts(const CIkb& theKB) = 0;
virtual int setfacts(const CIkb& theKB) = 0;
private:
};
/////////////////////////////////////////////////////////////////
// END OF RULEABLE CLASS
/////////////////////////////////////////////////////////////////
class CIkb : public CIInterface {
public:
// General running of the rulebase
virtual int clear() = 0;
virtual PMXErr solve(ruleable *object, char *filename) = 0;
// Fact management methods
virtual int getIntFact(char *fname, int *val) const = 0;
virtual int setIntFact(char *fname, int val) const = 0;
virtual int setTemplateFact(lptemplatedatarec lpTDR) const = 0;
virtual int getTemplateFact(lptemplatedatarec lpTDR) const = 0;
private:
};
#endif // __CIKB